package com.bdqn.t330.ch03.dao;

import com.bdqn.t330.ch03.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {

    int count();

    List<SysUser> getUserList();

    //List<SysUser> getUserList(@Param(value = "userName") String userName);
    List<SysUser> getFindByUserNameUserList(String userName);

    public List<SysUser> getUserListByPoJo(SysUser sysUser);

    List<SysUser> getUserListByParams(@Param("userName") String userName,
                                      @Param("roleId") Integer roleId);

    public List<SysUser> getUserAndAddressesByUserId(@Param("userid") Integer userid);

    public List<SysUser> getUserListPage(SysUser sysUser);

    public int add(SysUser sysUser);

    /**
     * 动态条件查询
     *
     * @param sysUser
     * @return
     */
    public List<SysUser> selectList(SysUser sysUser);

    /**
     * 动态条件查询
     *
     * @param sysUser
     * @return
     */
    public List<SysUser> chooseList(SysUser sysUser);


    public List<SysUser> getUserByRoleIdList(List<Integer> roleList);

    public List<SysUser> selectListTrim(@Param("sysUser") SysUser sysUser,
                                        @Param("pageBegin") Integer pageBegin,
                                        @Param("pageSize") Integer pageSize);
}
